(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

cond_scanr_f_z_xs_1(Cons(0, x11), 0) → Cons(0, Cons(0, x11))
cond_scanr_f_z_xs_1(Cons(S(x2), x11), 0) → Cons(S(x2), Cons(S(x2), x11))
cond_scanr_f_z_xs_1(Cons(0, x11), M(x2)) → Cons(0, Cons(0, x11))
cond_scanr_f_z_xs_1(Cons(S(x40), x23), M(0)) → Cons(S(x40), Cons(S(x40), x23))
cond_scanr_f_z_xs_1(Cons(S(x8), x23), M(S(x4))) → Cons(minus#2(x8, x4), Cons(S(x8), x23))
cond_scanr_f_z_xs_1(Cons(0, x11), S(x2)) → Cons(S(x2), Cons(0, x11))
cond_scanr_f_z_xs_1(Cons(S(x2), x11), S(x4)) → Cons(plus#2(S(x4), S(x2)), Cons(S(x2), x11))
scanr#3(Nil) → Cons(0, Nil)
scanr#3(Cons(x4, x2)) → cond_scanr_f_z_xs_1(scanr#3(x2), x4)
foldl#3(x2, Nil) → x2
foldl#3(x6, Cons(x4, x2)) → foldl#3(max#2(x6, x4), x2)
minus#2(0, x16) → 0
minus#2(S(x20), 0) → S(x20)
minus#2(S(x4), S(x2)) → minus#2(x4, x2)
plus#2(0, S(x2)) → S(x2)
plus#2(S(x4), S(x2)) → S(plus#2(x4, S(x2)))
max#2(0, x8) → x8
max#2(S(x12), 0) → S(x12)
max#2(S(x4), S(x2)) → S(max#2(x4, x2))
main(x1) → foldl#3(0, scanr#3(x1))

Rewrite Strategy: INNERMOST

(1) DecreasingLoopProof (EQUIVALENT transformation)

The following loop(s) give(s) rise to the lower bound Ω(n1):
The rewrite sequence
scanr#3(Cons(x4, x2)) →+ cond_scanr_f_z_xs_1(scanr#3(x2), x4)
gives rise to a decreasing loop by considering the right hand sides subterm at position [0].
The pumping substitution is [x2 / Cons(x4, x2)].
The result substitution is [ ].

(2) BOUNDS(n^1, INF)

(3) RenamingProof (EQUIVALENT transformation)

Renamed function symbols to avoid clashes with predefined symbol.

(4) Obligation:

Runtime Complexity Relative TRS:
The TRS R consists of the following rules:

cond_scanr_f_z_xs_1(Cons(0', x11), 0') → Cons(0', Cons(0', x11))
cond_scanr_f_z_xs_1(Cons(S(x2), x11), 0') → Cons(S(x2), Cons(S(x2), x11))
cond_scanr_f_z_xs_1(Cons(0', x11), M(x2)) → Cons(0', Cons(0', x11))
cond_scanr_f_z_xs_1(Cons(S(x40), x23), M(0')) → Cons(S(x40), Cons(S(x40), x23))
cond_scanr_f_z_xs_1(Cons(S(x8), x23), M(S(x4))) → Cons(minus#2(x8, x4), Cons(S(x8), x23))
cond_scanr_f_z_xs_1(Cons(0', x11), S(x2)) → Cons(S(x2), Cons(0', x11))
cond_scanr_f_z_xs_1(Cons(S(x2), x11), S(x4)) → Cons(plus#2(S(x4), S(x2)), Cons(S(x2), x11))
scanr#3(Nil) → Cons(0', Nil)
scanr#3(Cons(x4, x2)) → cond_scanr_f_z_xs_1(scanr#3(x2), x4)
foldl#3(x2, Nil) → x2
foldl#3(x6, Cons(x4, x2)) → foldl#3(max#2(x6, x4), x2)
minus#2(0', x16) → 0'
minus#2(S(x20), 0') → S(x20)
minus#2(S(x4), S(x2)) → minus#2(x4, x2)
plus#2(0', S(x2)) → S(x2)
plus#2(S(x4), S(x2)) → S(plus#2(x4, S(x2)))
max#2(0', x8) → x8
max#2(S(x12), 0') → S(x12)
max#2(S(x4), S(x2)) → S(max#2(x4, x2))
main(x1) → foldl#3(0', scanr#3(x1))

S is empty.
Rewrite Strategy: INNERMOST

(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(6) Obligation:

Innermost TRS:
Rules:
cond_scanr_f_z_xs_1(Cons(0', x11), 0') → Cons(0', Cons(0', x11))
cond_scanr_f_z_xs_1(Cons(S(x2), x11), 0') → Cons(S(x2), Cons(S(x2), x11))
cond_scanr_f_z_xs_1(Cons(0', x11), M(x2)) → Cons(0', Cons(0', x11))
cond_scanr_f_z_xs_1(Cons(S(x40), x23), M(0')) → Cons(S(x40), Cons(S(x40), x23))
cond_scanr_f_z_xs_1(Cons(S(x8), x23), M(S(x4))) → Cons(minus#2(x8, x4), Cons(S(x8), x23))
cond_scanr_f_z_xs_1(Cons(0', x11), S(x2)) → Cons(S(x2), Cons(0', x11))
cond_scanr_f_z_xs_1(Cons(S(x2), x11), S(x4)) → Cons(plus#2(S(x4), S(x2)), Cons(S(x2), x11))
scanr#3(Nil) → Cons(0', Nil)
scanr#3(Cons(x4, x2)) → cond_scanr_f_z_xs_1(scanr#3(x2), x4)
foldl#3(x2, Nil) → x2
foldl#3(x6, Cons(x4, x2)) → foldl#3(max#2(x6, x4), x2)
minus#2(0', x16) → 0'
minus#2(S(x20), 0') → S(x20)
minus#2(S(x4), S(x2)) → minus#2(x4, x2)
plus#2(0', S(x2)) → S(x2)
plus#2(S(x4), S(x2)) → S(plus#2(x4, S(x2)))
max#2(0', x8) → x8
max#2(S(x12), 0') → S(x12)
max#2(S(x4), S(x2)) → S(max#2(x4, x2))
main(x1) → foldl#3(0', scanr#3(x1))

Types:
cond_scanr_f_z_xs_1 :: Cons:Nil → 0':S:M → Cons:Nil
Cons :: 0':S:M → Cons:Nil → Cons:Nil
0' :: 0':S:M
S :: 0':S:M → 0':S:M
M :: 0':S:M → 0':S:M
minus#2 :: 0':S:M → 0':S:M → 0':S:M
plus#2 :: 0':S:M → 0':S:M → 0':S:M
scanr#3 :: Cons:Nil → Cons:Nil
Nil :: Cons:Nil
foldl#3 :: 0':S:M → Cons:Nil → 0':S:M
max#2 :: 0':S:M → 0':S:M → 0':S:M
main :: Cons:Nil → 0':S:M
hole_Cons:Nil1_5 :: Cons:Nil
hole_0':S:M2_5 :: 0':S:M
gen_Cons:Nil3_5 :: Nat → Cons:Nil
gen_0':S:M4_5 :: Nat → 0':S:M

(7) OrderProof (LOWER BOUND(ID) transformation)

Heuristically decided to analyse the following defined symbols:
minus#2, plus#2, scanr#3, foldl#3, max#2

They will be analysed ascendingly in the following order:
max#2 < foldl#3

(8) Obligation:

Innermost TRS:
Rules:
cond_scanr_f_z_xs_1(Cons(0', x11), 0') → Cons(0', Cons(0', x11))
cond_scanr_f_z_xs_1(Cons(S(x2), x11), 0') → Cons(S(x2), Cons(S(x2), x11))
cond_scanr_f_z_xs_1(Cons(0', x11), M(x2)) → Cons(0', Cons(0', x11))
cond_scanr_f_z_xs_1(Cons(S(x40), x23), M(0')) → Cons(S(x40), Cons(S(x40), x23))
cond_scanr_f_z_xs_1(Cons(S(x8), x23), M(S(x4))) → Cons(minus#2(x8, x4), Cons(S(x8), x23))
cond_scanr_f_z_xs_1(Cons(0', x11), S(x2)) → Cons(S(x2), Cons(0', x11))
cond_scanr_f_z_xs_1(Cons(S(x2), x11), S(x4)) → Cons(plus#2(S(x4), S(x2)), Cons(S(x2), x11))
scanr#3(Nil) → Cons(0', Nil)
scanr#3(Cons(x4, x2)) → cond_scanr_f_z_xs_1(scanr#3(x2), x4)
foldl#3(x2, Nil) → x2
foldl#3(x6, Cons(x4, x2)) → foldl#3(max#2(x6, x4), x2)
minus#2(0', x16) → 0'
minus#2(S(x20), 0') → S(x20)
minus#2(S(x4), S(x2)) → minus#2(x4, x2)
plus#2(0', S(x2)) → S(x2)
plus#2(S(x4), S(x2)) → S(plus#2(x4, S(x2)))
max#2(0', x8) → x8
max#2(S(x12), 0') → S(x12)
max#2(S(x4), S(x2)) → S(max#2(x4, x2))
main(x1) → foldl#3(0', scanr#3(x1))

Types:
cond_scanr_f_z_xs_1 :: Cons:Nil → 0':S:M → Cons:Nil
Cons :: 0':S:M → Cons:Nil → Cons:Nil
0' :: 0':S:M
S :: 0':S:M → 0':S:M
M :: 0':S:M → 0':S:M
minus#2 :: 0':S:M → 0':S:M → 0':S:M
plus#2 :: 0':S:M → 0':S:M → 0':S:M
scanr#3 :: Cons:Nil → Cons:Nil
Nil :: Cons:Nil
foldl#3 :: 0':S:M → Cons:Nil → 0':S:M
max#2 :: 0':S:M → 0':S:M → 0':S:M
main :: Cons:Nil → 0':S:M
hole_Cons:Nil1_5 :: Cons:Nil
hole_0':S:M2_5 :: 0':S:M
gen_Cons:Nil3_5 :: Nat → Cons:Nil
gen_0':S:M4_5 :: Nat → 0':S:M

Generator Equations:
gen_Cons:Nil3_5(0) ⇔ Nil
gen_Cons:Nil3_5(+(x, 1)) ⇔ Cons(0', gen_Cons:Nil3_5(x))
gen_0':S:M4_5(0) ⇔ 0'
gen_0':S:M4_5(+(x, 1)) ⇔ S(gen_0':S:M4_5(x))

The following defined symbols remain to be analysed:
minus#2, plus#2, scanr#3, foldl#3, max#2

They will be analysed ascendingly in the following order:
max#2 < foldl#3

(9) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
minus#2(gen_0':S:M4_5(n6_5), gen_0':S:M4_5(n6_5)) → gen_0':S:M4_5(0), rt ∈ Ω(1 + n65)

Induction Base:
minus#2(gen_0':S:M4_5(0), gen_0':S:M4_5(0)) →RΩ(1)
0'

Induction Step:
minus#2(gen_0':S:M4_5(+(n6_5, 1)), gen_0':S:M4_5(+(n6_5, 1))) →RΩ(1)
minus#2(gen_0':S:M4_5(n6_5), gen_0':S:M4_5(n6_5)) →IH
gen_0':S:M4_5(0)

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(10) Complex Obligation (BEST)

(11) Obligation:

Innermost TRS:
Rules:
cond_scanr_f_z_xs_1(Cons(0', x11), 0') → Cons(0', Cons(0', x11))
cond_scanr_f_z_xs_1(Cons(S(x2), x11), 0') → Cons(S(x2), Cons(S(x2), x11))
cond_scanr_f_z_xs_1(Cons(0', x11), M(x2)) → Cons(0', Cons(0', x11))
cond_scanr_f_z_xs_1(Cons(S(x40), x23), M(0')) → Cons(S(x40), Cons(S(x40), x23))
cond_scanr_f_z_xs_1(Cons(S(x8), x23), M(S(x4))) → Cons(minus#2(x8, x4), Cons(S(x8), x23))
cond_scanr_f_z_xs_1(Cons(0', x11), S(x2)) → Cons(S(x2), Cons(0', x11))
cond_scanr_f_z_xs_1(Cons(S(x2), x11), S(x4)) → Cons(plus#2(S(x4), S(x2)), Cons(S(x2), x11))
scanr#3(Nil) → Cons(0', Nil)
scanr#3(Cons(x4, x2)) → cond_scanr_f_z_xs_1(scanr#3(x2), x4)
foldl#3(x2, Nil) → x2
foldl#3(x6, Cons(x4, x2)) → foldl#3(max#2(x6, x4), x2)
minus#2(0', x16) → 0'
minus#2(S(x20), 0') → S(x20)
minus#2(S(x4), S(x2)) → minus#2(x4, x2)
plus#2(0', S(x2)) → S(x2)
plus#2(S(x4), S(x2)) → S(plus#2(x4, S(x2)))
max#2(0', x8) → x8
max#2(S(x12), 0') → S(x12)
max#2(S(x4), S(x2)) → S(max#2(x4, x2))
main(x1) → foldl#3(0', scanr#3(x1))

Types:
cond_scanr_f_z_xs_1 :: Cons:Nil → 0':S:M → Cons:Nil
Cons :: 0':S:M → Cons:Nil → Cons:Nil
0' :: 0':S:M
S :: 0':S:M → 0':S:M
M :: 0':S:M → 0':S:M
minus#2 :: 0':S:M → 0':S:M → 0':S:M
plus#2 :: 0':S:M → 0':S:M → 0':S:M
scanr#3 :: Cons:Nil → Cons:Nil
Nil :: Cons:Nil
foldl#3 :: 0':S:M → Cons:Nil → 0':S:M
max#2 :: 0':S:M → 0':S:M → 0':S:M
main :: Cons:Nil → 0':S:M
hole_Cons:Nil1_5 :: Cons:Nil
hole_0':S:M2_5 :: 0':S:M
gen_Cons:Nil3_5 :: Nat → Cons:Nil
gen_0':S:M4_5 :: Nat → 0':S:M

Lemmas:
minus#2(gen_0':S:M4_5(n6_5), gen_0':S:M4_5(n6_5)) → gen_0':S:M4_5(0), rt ∈ Ω(1 + n65)

Generator Equations:
gen_Cons:Nil3_5(0) ⇔ Nil
gen_Cons:Nil3_5(+(x, 1)) ⇔ Cons(0', gen_Cons:Nil3_5(x))
gen_0':S:M4_5(0) ⇔ 0'
gen_0':S:M4_5(+(x, 1)) ⇔ S(gen_0':S:M4_5(x))

The following defined symbols remain to be analysed:
plus#2, scanr#3, foldl#3, max#2

They will be analysed ascendingly in the following order:
max#2 < foldl#3

(12) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
plus#2(gen_0':S:M4_5(n679_5), gen_0':S:M4_5(1)) → gen_0':S:M4_5(+(1, n679_5)), rt ∈ Ω(1 + n6795)

Induction Base:
plus#2(gen_0':S:M4_5(0), gen_0':S:M4_5(1)) →RΩ(1)
S(gen_0':S:M4_5(0))

Induction Step:
plus#2(gen_0':S:M4_5(+(n679_5, 1)), gen_0':S:M4_5(1)) →RΩ(1)
S(plus#2(gen_0':S:M4_5(n679_5), S(gen_0':S:M4_5(0)))) →IH
S(gen_0':S:M4_5(+(1, c680_5)))

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(13) Complex Obligation (BEST)

(14) Obligation:

Innermost TRS:
Rules:
cond_scanr_f_z_xs_1(Cons(0', x11), 0') → Cons(0', Cons(0', x11))
cond_scanr_f_z_xs_1(Cons(S(x2), x11), 0') → Cons(S(x2), Cons(S(x2), x11))
cond_scanr_f_z_xs_1(Cons(0', x11), M(x2)) → Cons(0', Cons(0', x11))
cond_scanr_f_z_xs_1(Cons(S(x40), x23), M(0')) → Cons(S(x40), Cons(S(x40), x23))
cond_scanr_f_z_xs_1(Cons(S(x8), x23), M(S(x4))) → Cons(minus#2(x8, x4), Cons(S(x8), x23))
cond_scanr_f_z_xs_1(Cons(0', x11), S(x2)) → Cons(S(x2), Cons(0', x11))
cond_scanr_f_z_xs_1(Cons(S(x2), x11), S(x4)) → Cons(plus#2(S(x4), S(x2)), Cons(S(x2), x11))
scanr#3(Nil) → Cons(0', Nil)
scanr#3(Cons(x4, x2)) → cond_scanr_f_z_xs_1(scanr#3(x2), x4)
foldl#3(x2, Nil) → x2
foldl#3(x6, Cons(x4, x2)) → foldl#3(max#2(x6, x4), x2)
minus#2(0', x16) → 0'
minus#2(S(x20), 0') → S(x20)
minus#2(S(x4), S(x2)) → minus#2(x4, x2)
plus#2(0', S(x2)) → S(x2)
plus#2(S(x4), S(x2)) → S(plus#2(x4, S(x2)))
max#2(0', x8) → x8
max#2(S(x12), 0') → S(x12)
max#2(S(x4), S(x2)) → S(max#2(x4, x2))
main(x1) → foldl#3(0', scanr#3(x1))

Types:
cond_scanr_f_z_xs_1 :: Cons:Nil → 0':S:M → Cons:Nil
Cons :: 0':S:M → Cons:Nil → Cons:Nil
0' :: 0':S:M
S :: 0':S:M → 0':S:M
M :: 0':S:M → 0':S:M
minus#2 :: 0':S:M → 0':S:M → 0':S:M
plus#2 :: 0':S:M → 0':S:M → 0':S:M
scanr#3 :: Cons:Nil → Cons:Nil
Nil :: Cons:Nil
foldl#3 :: 0':S:M → Cons:Nil → 0':S:M
max#2 :: 0':S:M → 0':S:M → 0':S:M
main :: Cons:Nil → 0':S:M
hole_Cons:Nil1_5 :: Cons:Nil
hole_0':S:M2_5 :: 0':S:M
gen_Cons:Nil3_5 :: Nat → Cons:Nil
gen_0':S:M4_5 :: Nat → 0':S:M

Lemmas:
minus#2(gen_0':S:M4_5(n6_5), gen_0':S:M4_5(n6_5)) → gen_0':S:M4_5(0), rt ∈ Ω(1 + n65)
plus#2(gen_0':S:M4_5(n679_5), gen_0':S:M4_5(1)) → gen_0':S:M4_5(+(1, n679_5)), rt ∈ Ω(1 + n6795)

Generator Equations:
gen_Cons:Nil3_5(0) ⇔ Nil
gen_Cons:Nil3_5(+(x, 1)) ⇔ Cons(0', gen_Cons:Nil3_5(x))
gen_0':S:M4_5(0) ⇔ 0'
gen_0':S:M4_5(+(x, 1)) ⇔ S(gen_0':S:M4_5(x))

The following defined symbols remain to be analysed:
scanr#3, foldl#3, max#2

They will be analysed ascendingly in the following order:
max#2 < foldl#3

(15) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
scanr#3(gen_Cons:Nil3_5(n1297_5)) → gen_Cons:Nil3_5(+(1, n1297_5)), rt ∈ Ω(1 + n12975)

Induction Base:
scanr#3(gen_Cons:Nil3_5(0)) →RΩ(1)
Cons(0', Nil)

Induction Step:
scanr#3(gen_Cons:Nil3_5(+(n1297_5, 1))) →RΩ(1)
cond_scanr_f_z_xs_1(scanr#3(gen_Cons:Nil3_5(n1297_5)), 0') →IH
cond_scanr_f_z_xs_1(gen_Cons:Nil3_5(+(1, c1298_5)), 0') →RΩ(1)
Cons(0', Cons(0', gen_Cons:Nil3_5(n1297_5)))

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(16) Complex Obligation (BEST)

(17) Obligation:

Innermost TRS:
Rules:
cond_scanr_f_z_xs_1(Cons(0', x11), 0') → Cons(0', Cons(0', x11))
cond_scanr_f_z_xs_1(Cons(S(x2), x11), 0') → Cons(S(x2), Cons(S(x2), x11))
cond_scanr_f_z_xs_1(Cons(0', x11), M(x2)) → Cons(0', Cons(0', x11))
cond_scanr_f_z_xs_1(Cons(S(x40), x23), M(0')) → Cons(S(x40), Cons(S(x40), x23))
cond_scanr_f_z_xs_1(Cons(S(x8), x23), M(S(x4))) → Cons(minus#2(x8, x4), Cons(S(x8), x23))
cond_scanr_f_z_xs_1(Cons(0', x11), S(x2)) → Cons(S(x2), Cons(0', x11))
cond_scanr_f_z_xs_1(Cons(S(x2), x11), S(x4)) → Cons(plus#2(S(x4), S(x2)), Cons(S(x2), x11))
scanr#3(Nil) → Cons(0', Nil)
scanr#3(Cons(x4, x2)) → cond_scanr_f_z_xs_1(scanr#3(x2), x4)
foldl#3(x2, Nil) → x2
foldl#3(x6, Cons(x4, x2)) → foldl#3(max#2(x6, x4), x2)
minus#2(0', x16) → 0'
minus#2(S(x20), 0') → S(x20)
minus#2(S(x4), S(x2)) → minus#2(x4, x2)
plus#2(0', S(x2)) → S(x2)
plus#2(S(x4), S(x2)) → S(plus#2(x4, S(x2)))
max#2(0', x8) → x8
max#2(S(x12), 0') → S(x12)
max#2(S(x4), S(x2)) → S(max#2(x4, x2))
main(x1) → foldl#3(0', scanr#3(x1))

Types:
cond_scanr_f_z_xs_1 :: Cons:Nil → 0':S:M → Cons:Nil
Cons :: 0':S:M → Cons:Nil → Cons:Nil
0' :: 0':S:M
S :: 0':S:M → 0':S:M
M :: 0':S:M → 0':S:M
minus#2 :: 0':S:M → 0':S:M → 0':S:M
plus#2 :: 0':S:M → 0':S:M → 0':S:M
scanr#3 :: Cons:Nil → Cons:Nil
Nil :: Cons:Nil
foldl#3 :: 0':S:M → Cons:Nil → 0':S:M
max#2 :: 0':S:M → 0':S:M → 0':S:M
main :: Cons:Nil → 0':S:M
hole_Cons:Nil1_5 :: Cons:Nil
hole_0':S:M2_5 :: 0':S:M
gen_Cons:Nil3_5 :: Nat → Cons:Nil
gen_0':S:M4_5 :: Nat → 0':S:M

Lemmas:
minus#2(gen_0':S:M4_5(n6_5), gen_0':S:M4_5(n6_5)) → gen_0':S:M4_5(0), rt ∈ Ω(1 + n65)
plus#2(gen_0':S:M4_5(n679_5), gen_0':S:M4_5(1)) → gen_0':S:M4_5(+(1, n679_5)), rt ∈ Ω(1 + n6795)
scanr#3(gen_Cons:Nil3_5(n1297_5)) → gen_Cons:Nil3_5(+(1, n1297_5)), rt ∈ Ω(1 + n12975)

Generator Equations:
gen_Cons:Nil3_5(0) ⇔ Nil
gen_Cons:Nil3_5(+(x, 1)) ⇔ Cons(0', gen_Cons:Nil3_5(x))
gen_0':S:M4_5(0) ⇔ 0'
gen_0':S:M4_5(+(x, 1)) ⇔ S(gen_0':S:M4_5(x))

The following defined symbols remain to be analysed:
max#2, foldl#3

They will be analysed ascendingly in the following order:
max#2 < foldl#3

(18) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
max#2(gen_0':S:M4_5(n15671_5), gen_0':S:M4_5(n15671_5)) → gen_0':S:M4_5(n15671_5), rt ∈ Ω(1 + n156715)

Induction Base:
max#2(gen_0':S:M4_5(0), gen_0':S:M4_5(0)) →RΩ(1)
gen_0':S:M4_5(0)

Induction Step:
max#2(gen_0':S:M4_5(+(n15671_5, 1)), gen_0':S:M4_5(+(n15671_5, 1))) →RΩ(1)
S(max#2(gen_0':S:M4_5(n15671_5), gen_0':S:M4_5(n15671_5))) →IH
S(gen_0':S:M4_5(c15672_5))

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(19) Complex Obligation (BEST)

(20) Obligation:

Innermost TRS:
Rules:
cond_scanr_f_z_xs_1(Cons(0', x11), 0') → Cons(0', Cons(0', x11))
cond_scanr_f_z_xs_1(Cons(S(x2), x11), 0') → Cons(S(x2), Cons(S(x2), x11))
cond_scanr_f_z_xs_1(Cons(0', x11), M(x2)) → Cons(0', Cons(0', x11))
cond_scanr_f_z_xs_1(Cons(S(x40), x23), M(0')) → Cons(S(x40), Cons(S(x40), x23))
cond_scanr_f_z_xs_1(Cons(S(x8), x23), M(S(x4))) → Cons(minus#2(x8, x4), Cons(S(x8), x23))
cond_scanr_f_z_xs_1(Cons(0', x11), S(x2)) → Cons(S(x2), Cons(0', x11))
cond_scanr_f_z_xs_1(Cons(S(x2), x11), S(x4)) → Cons(plus#2(S(x4), S(x2)), Cons(S(x2), x11))
scanr#3(Nil) → Cons(0', Nil)
scanr#3(Cons(x4, x2)) → cond_scanr_f_z_xs_1(scanr#3(x2), x4)
foldl#3(x2, Nil) → x2
foldl#3(x6, Cons(x4, x2)) → foldl#3(max#2(x6, x4), x2)
minus#2(0', x16) → 0'
minus#2(S(x20), 0') → S(x20)
minus#2(S(x4), S(x2)) → minus#2(x4, x2)
plus#2(0', S(x2)) → S(x2)
plus#2(S(x4), S(x2)) → S(plus#2(x4, S(x2)))
max#2(0', x8) → x8
max#2(S(x12), 0') → S(x12)
max#2(S(x4), S(x2)) → S(max#2(x4, x2))
main(x1) → foldl#3(0', scanr#3(x1))

Types:
cond_scanr_f_z_xs_1 :: Cons:Nil → 0':S:M → Cons:Nil
Cons :: 0':S:M → Cons:Nil → Cons:Nil
0' :: 0':S:M
S :: 0':S:M → 0':S:M
M :: 0':S:M → 0':S:M
minus#2 :: 0':S:M → 0':S:M → 0':S:M
plus#2 :: 0':S:M → 0':S:M → 0':S:M
scanr#3 :: Cons:Nil → Cons:Nil
Nil :: Cons:Nil
foldl#3 :: 0':S:M → Cons:Nil → 0':S:M
max#2 :: 0':S:M → 0':S:M → 0':S:M
main :: Cons:Nil → 0':S:M
hole_Cons:Nil1_5 :: Cons:Nil
hole_0':S:M2_5 :: 0':S:M
gen_Cons:Nil3_5 :: Nat → Cons:Nil
gen_0':S:M4_5 :: Nat → 0':S:M

Lemmas:
minus#2(gen_0':S:M4_5(n6_5), gen_0':S:M4_5(n6_5)) → gen_0':S:M4_5(0), rt ∈ Ω(1 + n65)
plus#2(gen_0':S:M4_5(n679_5), gen_0':S:M4_5(1)) → gen_0':S:M4_5(+(1, n679_5)), rt ∈ Ω(1 + n6795)
scanr#3(gen_Cons:Nil3_5(n1297_5)) → gen_Cons:Nil3_5(+(1, n1297_5)), rt ∈ Ω(1 + n12975)
max#2(gen_0':S:M4_5(n15671_5), gen_0':S:M4_5(n15671_5)) → gen_0':S:M4_5(n15671_5), rt ∈ Ω(1 + n156715)

Generator Equations:
gen_Cons:Nil3_5(0) ⇔ Nil
gen_Cons:Nil3_5(+(x, 1)) ⇔ Cons(0', gen_Cons:Nil3_5(x))
gen_0':S:M4_5(0) ⇔ 0'
gen_0':S:M4_5(+(x, 1)) ⇔ S(gen_0':S:M4_5(x))

The following defined symbols remain to be analysed:
foldl#3

(21) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
foldl#3(gen_0':S:M4_5(0), gen_Cons:Nil3_5(n16598_5)) → gen_0':S:M4_5(0), rt ∈ Ω(1 + n165985)

Induction Base:
foldl#3(gen_0':S:M4_5(0), gen_Cons:Nil3_5(0)) →RΩ(1)
gen_0':S:M4_5(0)

Induction Step:
foldl#3(gen_0':S:M4_5(0), gen_Cons:Nil3_5(+(n16598_5, 1))) →RΩ(1)
foldl#3(max#2(gen_0':S:M4_5(0), 0'), gen_Cons:Nil3_5(n16598_5)) →LΩ(1)
foldl#3(gen_0':S:M4_5(0), gen_Cons:Nil3_5(n16598_5)) →IH
gen_0':S:M4_5(0)

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(22) Complex Obligation (BEST)

(23) Obligation:

Innermost TRS:
Rules:
cond_scanr_f_z_xs_1(Cons(0', x11), 0') → Cons(0', Cons(0', x11))
cond_scanr_f_z_xs_1(Cons(S(x2), x11), 0') → Cons(S(x2), Cons(S(x2), x11))
cond_scanr_f_z_xs_1(Cons(0', x11), M(x2)) → Cons(0', Cons(0', x11))
cond_scanr_f_z_xs_1(Cons(S(x40), x23), M(0')) → Cons(S(x40), Cons(S(x40), x23))
cond_scanr_f_z_xs_1(Cons(S(x8), x23), M(S(x4))) → Cons(minus#2(x8, x4), Cons(S(x8), x23))
cond_scanr_f_z_xs_1(Cons(0', x11), S(x2)) → Cons(S(x2), Cons(0', x11))
cond_scanr_f_z_xs_1(Cons(S(x2), x11), S(x4)) → Cons(plus#2(S(x4), S(x2)), Cons(S(x2), x11))
scanr#3(Nil) → Cons(0', Nil)
scanr#3(Cons(x4, x2)) → cond_scanr_f_z_xs_1(scanr#3(x2), x4)
foldl#3(x2, Nil) → x2
foldl#3(x6, Cons(x4, x2)) → foldl#3(max#2(x6, x4), x2)
minus#2(0', x16) → 0'
minus#2(S(x20), 0') → S(x20)
minus#2(S(x4), S(x2)) → minus#2(x4, x2)
plus#2(0', S(x2)) → S(x2)
plus#2(S(x4), S(x2)) → S(plus#2(x4, S(x2)))
max#2(0', x8) → x8
max#2(S(x12), 0') → S(x12)
max#2(S(x4), S(x2)) → S(max#2(x4, x2))
main(x1) → foldl#3(0', scanr#3(x1))

Types:
cond_scanr_f_z_xs_1 :: Cons:Nil → 0':S:M → Cons:Nil
Cons :: 0':S:M → Cons:Nil → Cons:Nil
0' :: 0':S:M
S :: 0':S:M → 0':S:M
M :: 0':S:M → 0':S:M
minus#2 :: 0':S:M → 0':S:M → 0':S:M
plus#2 :: 0':S:M → 0':S:M → 0':S:M
scanr#3 :: Cons:Nil → Cons:Nil
Nil :: Cons:Nil
foldl#3 :: 0':S:M → Cons:Nil → 0':S:M
max#2 :: 0':S:M → 0':S:M → 0':S:M
main :: Cons:Nil → 0':S:M
hole_Cons:Nil1_5 :: Cons:Nil
hole_0':S:M2_5 :: 0':S:M
gen_Cons:Nil3_5 :: Nat → Cons:Nil
gen_0':S:M4_5 :: Nat → 0':S:M

Lemmas:
minus#2(gen_0':S:M4_5(n6_5), gen_0':S:M4_5(n6_5)) → gen_0':S:M4_5(0), rt ∈ Ω(1 + n65)
plus#2(gen_0':S:M4_5(n679_5), gen_0':S:M4_5(1)) → gen_0':S:M4_5(+(1, n679_5)), rt ∈ Ω(1 + n6795)
scanr#3(gen_Cons:Nil3_5(n1297_5)) → gen_Cons:Nil3_5(+(1, n1297_5)), rt ∈ Ω(1 + n12975)
max#2(gen_0':S:M4_5(n15671_5), gen_0':S:M4_5(n15671_5)) → gen_0':S:M4_5(n15671_5), rt ∈ Ω(1 + n156715)
foldl#3(gen_0':S:M4_5(0), gen_Cons:Nil3_5(n16598_5)) → gen_0':S:M4_5(0), rt ∈ Ω(1 + n165985)

Generator Equations:
gen_Cons:Nil3_5(0) ⇔ Nil
gen_Cons:Nil3_5(+(x, 1)) ⇔ Cons(0', gen_Cons:Nil3_5(x))
gen_0':S:M4_5(0) ⇔ 0'
gen_0':S:M4_5(+(x, 1)) ⇔ S(gen_0':S:M4_5(x))

No more defined symbols left to analyse.

(24) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
minus#2(gen_0':S:M4_5(n6_5), gen_0':S:M4_5(n6_5)) → gen_0':S:M4_5(0), rt ∈ Ω(1 + n65)

(25) BOUNDS(n^1, INF)

(26) Obligation:

Innermost TRS:
Rules:
cond_scanr_f_z_xs_1(Cons(0', x11), 0') → Cons(0', Cons(0', x11))
cond_scanr_f_z_xs_1(Cons(S(x2), x11), 0') → Cons(S(x2), Cons(S(x2), x11))
cond_scanr_f_z_xs_1(Cons(0', x11), M(x2)) → Cons(0', Cons(0', x11))
cond_scanr_f_z_xs_1(Cons(S(x40), x23), M(0')) → Cons(S(x40), Cons(S(x40), x23))
cond_scanr_f_z_xs_1(Cons(S(x8), x23), M(S(x4))) → Cons(minus#2(x8, x4), Cons(S(x8), x23))
cond_scanr_f_z_xs_1(Cons(0', x11), S(x2)) → Cons(S(x2), Cons(0', x11))
cond_scanr_f_z_xs_1(Cons(S(x2), x11), S(x4)) → Cons(plus#2(S(x4), S(x2)), Cons(S(x2), x11))
scanr#3(Nil) → Cons(0', Nil)
scanr#3(Cons(x4, x2)) → cond_scanr_f_z_xs_1(scanr#3(x2), x4)
foldl#3(x2, Nil) → x2
foldl#3(x6, Cons(x4, x2)) → foldl#3(max#2(x6, x4), x2)
minus#2(0', x16) → 0'
minus#2(S(x20), 0') → S(x20)
minus#2(S(x4), S(x2)) → minus#2(x4, x2)
plus#2(0', S(x2)) → S(x2)
plus#2(S(x4), S(x2)) → S(plus#2(x4, S(x2)))
max#2(0', x8) → x8
max#2(S(x12), 0') → S(x12)
max#2(S(x4), S(x2)) → S(max#2(x4, x2))
main(x1) → foldl#3(0', scanr#3(x1))

Types:
cond_scanr_f_z_xs_1 :: Cons:Nil → 0':S:M → Cons:Nil
Cons :: 0':S:M → Cons:Nil → Cons:Nil
0' :: 0':S:M
S :: 0':S:M → 0':S:M
M :: 0':S:M → 0':S:M
minus#2 :: 0':S:M → 0':S:M → 0':S:M
plus#2 :: 0':S:M → 0':S:M → 0':S:M
scanr#3 :: Cons:Nil → Cons:Nil
Nil :: Cons:Nil
foldl#3 :: 0':S:M → Cons:Nil → 0':S:M
max#2 :: 0':S:M → 0':S:M → 0':S:M
main :: Cons:Nil → 0':S:M
hole_Cons:Nil1_5 :: Cons:Nil
hole_0':S:M2_5 :: 0':S:M
gen_Cons:Nil3_5 :: Nat → Cons:Nil
gen_0':S:M4_5 :: Nat → 0':S:M

Lemmas:
minus#2(gen_0':S:M4_5(n6_5), gen_0':S:M4_5(n6_5)) → gen_0':S:M4_5(0), rt ∈ Ω(1 + n65)
plus#2(gen_0':S:M4_5(n679_5), gen_0':S:M4_5(1)) → gen_0':S:M4_5(+(1, n679_5)), rt ∈ Ω(1 + n6795)
scanr#3(gen_Cons:Nil3_5(n1297_5)) → gen_Cons:Nil3_5(+(1, n1297_5)), rt ∈ Ω(1 + n12975)
max#2(gen_0':S:M4_5(n15671_5), gen_0':S:M4_5(n15671_5)) → gen_0':S:M4_5(n15671_5), rt ∈ Ω(1 + n156715)
foldl#3(gen_0':S:M4_5(0), gen_Cons:Nil3_5(n16598_5)) → gen_0':S:M4_5(0), rt ∈ Ω(1 + n165985)

Generator Equations:
gen_Cons:Nil3_5(0) ⇔ Nil
gen_Cons:Nil3_5(+(x, 1)) ⇔ Cons(0', gen_Cons:Nil3_5(x))
gen_0':S:M4_5(0) ⇔ 0'
gen_0':S:M4_5(+(x, 1)) ⇔ S(gen_0':S:M4_5(x))

No more defined symbols left to analyse.

(27) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
minus#2(gen_0':S:M4_5(n6_5), gen_0':S:M4_5(n6_5)) → gen_0':S:M4_5(0), rt ∈ Ω(1 + n65)

(28) BOUNDS(n^1, INF)

(29) Obligation:

Innermost TRS:
Rules:
cond_scanr_f_z_xs_1(Cons(0', x11), 0') → Cons(0', Cons(0', x11))
cond_scanr_f_z_xs_1(Cons(S(x2), x11), 0') → Cons(S(x2), Cons(S(x2), x11))
cond_scanr_f_z_xs_1(Cons(0', x11), M(x2)) → Cons(0', Cons(0', x11))
cond_scanr_f_z_xs_1(Cons(S(x40), x23), M(0')) → Cons(S(x40), Cons(S(x40), x23))
cond_scanr_f_z_xs_1(Cons(S(x8), x23), M(S(x4))) → Cons(minus#2(x8, x4), Cons(S(x8), x23))
cond_scanr_f_z_xs_1(Cons(0', x11), S(x2)) → Cons(S(x2), Cons(0', x11))
cond_scanr_f_z_xs_1(Cons(S(x2), x11), S(x4)) → Cons(plus#2(S(x4), S(x2)), Cons(S(x2), x11))
scanr#3(Nil) → Cons(0', Nil)
scanr#3(Cons(x4, x2)) → cond_scanr_f_z_xs_1(scanr#3(x2), x4)
foldl#3(x2, Nil) → x2
foldl#3(x6, Cons(x4, x2)) → foldl#3(max#2(x6, x4), x2)
minus#2(0', x16) → 0'
minus#2(S(x20), 0') → S(x20)
minus#2(S(x4), S(x2)) → minus#2(x4, x2)
plus#2(0', S(x2)) → S(x2)
plus#2(S(x4), S(x2)) → S(plus#2(x4, S(x2)))
max#2(0', x8) → x8
max#2(S(x12), 0') → S(x12)
max#2(S(x4), S(x2)) → S(max#2(x4, x2))
main(x1) → foldl#3(0', scanr#3(x1))

Types:
cond_scanr_f_z_xs_1 :: Cons:Nil → 0':S:M → Cons:Nil
Cons :: 0':S:M → Cons:Nil → Cons:Nil
0' :: 0':S:M
S :: 0':S:M → 0':S:M
M :: 0':S:M → 0':S:M
minus#2 :: 0':S:M → 0':S:M → 0':S:M
plus#2 :: 0':S:M → 0':S:M → 0':S:M
scanr#3 :: Cons:Nil → Cons:Nil
Nil :: Cons:Nil
foldl#3 :: 0':S:M → Cons:Nil → 0':S:M
max#2 :: 0':S:M → 0':S:M → 0':S:M
main :: Cons:Nil → 0':S:M
hole_Cons:Nil1_5 :: Cons:Nil
hole_0':S:M2_5 :: 0':S:M
gen_Cons:Nil3_5 :: Nat → Cons:Nil
gen_0':S:M4_5 :: Nat → 0':S:M

Lemmas:
minus#2(gen_0':S:M4_5(n6_5), gen_0':S:M4_5(n6_5)) → gen_0':S:M4_5(0), rt ∈ Ω(1 + n65)
plus#2(gen_0':S:M4_5(n679_5), gen_0':S:M4_5(1)) → gen_0':S:M4_5(+(1, n679_5)), rt ∈ Ω(1 + n6795)
scanr#3(gen_Cons:Nil3_5(n1297_5)) → gen_Cons:Nil3_5(+(1, n1297_5)), rt ∈ Ω(1 + n12975)
max#2(gen_0':S:M4_5(n15671_5), gen_0':S:M4_5(n15671_5)) → gen_0':S:M4_5(n15671_5), rt ∈ Ω(1 + n156715)

Generator Equations:
gen_Cons:Nil3_5(0) ⇔ Nil
gen_Cons:Nil3_5(+(x, 1)) ⇔ Cons(0', gen_Cons:Nil3_5(x))
gen_0':S:M4_5(0) ⇔ 0'
gen_0':S:M4_5(+(x, 1)) ⇔ S(gen_0':S:M4_5(x))

No more defined symbols left to analyse.

(30) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
minus#2(gen_0':S:M4_5(n6_5), gen_0':S:M4_5(n6_5)) → gen_0':S:M4_5(0), rt ∈ Ω(1 + n65)

(31) BOUNDS(n^1, INF)

(32) Obligation:

Innermost TRS:
Rules:
cond_scanr_f_z_xs_1(Cons(0', x11), 0') → Cons(0', Cons(0', x11))
cond_scanr_f_z_xs_1(Cons(S(x2), x11), 0') → Cons(S(x2), Cons(S(x2), x11))
cond_scanr_f_z_xs_1(Cons(0', x11), M(x2)) → Cons(0', Cons(0', x11))
cond_scanr_f_z_xs_1(Cons(S(x40), x23), M(0')) → Cons(S(x40), Cons(S(x40), x23))
cond_scanr_f_z_xs_1(Cons(S(x8), x23), M(S(x4))) → Cons(minus#2(x8, x4), Cons(S(x8), x23))
cond_scanr_f_z_xs_1(Cons(0', x11), S(x2)) → Cons(S(x2), Cons(0', x11))
cond_scanr_f_z_xs_1(Cons(S(x2), x11), S(x4)) → Cons(plus#2(S(x4), S(x2)), Cons(S(x2), x11))
scanr#3(Nil) → Cons(0', Nil)
scanr#3(Cons(x4, x2)) → cond_scanr_f_z_xs_1(scanr#3(x2), x4)
foldl#3(x2, Nil) → x2
foldl#3(x6, Cons(x4, x2)) → foldl#3(max#2(x6, x4), x2)
minus#2(0', x16) → 0'
minus#2(S(x20), 0') → S(x20)
minus#2(S(x4), S(x2)) → minus#2(x4, x2)
plus#2(0', S(x2)) → S(x2)
plus#2(S(x4), S(x2)) → S(plus#2(x4, S(x2)))
max#2(0', x8) → x8
max#2(S(x12), 0') → S(x12)
max#2(S(x4), S(x2)) → S(max#2(x4, x2))
main(x1) → foldl#3(0', scanr#3(x1))

Types:
cond_scanr_f_z_xs_1 :: Cons:Nil → 0':S:M → Cons:Nil
Cons :: 0':S:M → Cons:Nil → Cons:Nil
0' :: 0':S:M
S :: 0':S:M → 0':S:M
M :: 0':S:M → 0':S:M
minus#2 :: 0':S:M → 0':S:M → 0':S:M
plus#2 :: 0':S:M → 0':S:M → 0':S:M
scanr#3 :: Cons:Nil → Cons:Nil
Nil :: Cons:Nil
foldl#3 :: 0':S:M → Cons:Nil → 0':S:M
max#2 :: 0':S:M → 0':S:M → 0':S:M
main :: Cons:Nil → 0':S:M
hole_Cons:Nil1_5 :: Cons:Nil
hole_0':S:M2_5 :: 0':S:M
gen_Cons:Nil3_5 :: Nat → Cons:Nil
gen_0':S:M4_5 :: Nat → 0':S:M

Lemmas:
minus#2(gen_0':S:M4_5(n6_5), gen_0':S:M4_5(n6_5)) → gen_0':S:M4_5(0), rt ∈ Ω(1 + n65)
plus#2(gen_0':S:M4_5(n679_5), gen_0':S:M4_5(1)) → gen_0':S:M4_5(+(1, n679_5)), rt ∈ Ω(1 + n6795)
scanr#3(gen_Cons:Nil3_5(n1297_5)) → gen_Cons:Nil3_5(+(1, n1297_5)), rt ∈ Ω(1 + n12975)

Generator Equations:
gen_Cons:Nil3_5(0) ⇔ Nil
gen_Cons:Nil3_5(+(x, 1)) ⇔ Cons(0', gen_Cons:Nil3_5(x))
gen_0':S:M4_5(0) ⇔ 0'
gen_0':S:M4_5(+(x, 1)) ⇔ S(gen_0':S:M4_5(x))

No more defined symbols left to analyse.

(33) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
minus#2(gen_0':S:M4_5(n6_5), gen_0':S:M4_5(n6_5)) → gen_0':S:M4_5(0), rt ∈ Ω(1 + n65)

(34) BOUNDS(n^1, INF)

(35) Obligation:

Innermost TRS:
Rules:
cond_scanr_f_z_xs_1(Cons(0', x11), 0') → Cons(0', Cons(0', x11))
cond_scanr_f_z_xs_1(Cons(S(x2), x11), 0') → Cons(S(x2), Cons(S(x2), x11))
cond_scanr_f_z_xs_1(Cons(0', x11), M(x2)) → Cons(0', Cons(0', x11))
cond_scanr_f_z_xs_1(Cons(S(x40), x23), M(0')) → Cons(S(x40), Cons(S(x40), x23))
cond_scanr_f_z_xs_1(Cons(S(x8), x23), M(S(x4))) → Cons(minus#2(x8, x4), Cons(S(x8), x23))
cond_scanr_f_z_xs_1(Cons(0', x11), S(x2)) → Cons(S(x2), Cons(0', x11))
cond_scanr_f_z_xs_1(Cons(S(x2), x11), S(x4)) → Cons(plus#2(S(x4), S(x2)), Cons(S(x2), x11))
scanr#3(Nil) → Cons(0', Nil)
scanr#3(Cons(x4, x2)) → cond_scanr_f_z_xs_1(scanr#3(x2), x4)
foldl#3(x2, Nil) → x2
foldl#3(x6, Cons(x4, x2)) → foldl#3(max#2(x6, x4), x2)
minus#2(0', x16) → 0'
minus#2(S(x20), 0') → S(x20)
minus#2(S(x4), S(x2)) → minus#2(x4, x2)
plus#2(0', S(x2)) → S(x2)
plus#2(S(x4), S(x2)) → S(plus#2(x4, S(x2)))
max#2(0', x8) → x8
max#2(S(x12), 0') → S(x12)
max#2(S(x4), S(x2)) → S(max#2(x4, x2))
main(x1) → foldl#3(0', scanr#3(x1))

Types:
cond_scanr_f_z_xs_1 :: Cons:Nil → 0':S:M → Cons:Nil
Cons :: 0':S:M → Cons:Nil → Cons:Nil
0' :: 0':S:M
S :: 0':S:M → 0':S:M
M :: 0':S:M → 0':S:M
minus#2 :: 0':S:M → 0':S:M → 0':S:M
plus#2 :: 0':S:M → 0':S:M → 0':S:M
scanr#3 :: Cons:Nil → Cons:Nil
Nil :: Cons:Nil
foldl#3 :: 0':S:M → Cons:Nil → 0':S:M
max#2 :: 0':S:M → 0':S:M → 0':S:M
main :: Cons:Nil → 0':S:M
hole_Cons:Nil1_5 :: Cons:Nil
hole_0':S:M2_5 :: 0':S:M
gen_Cons:Nil3_5 :: Nat → Cons:Nil
gen_0':S:M4_5 :: Nat → 0':S:M

Lemmas:
minus#2(gen_0':S:M4_5(n6_5), gen_0':S:M4_5(n6_5)) → gen_0':S:M4_5(0), rt ∈ Ω(1 + n65)
plus#2(gen_0':S:M4_5(n679_5), gen_0':S:M4_5(1)) → gen_0':S:M4_5(+(1, n679_5)), rt ∈ Ω(1 + n6795)

Generator Equations:
gen_Cons:Nil3_5(0) ⇔ Nil
gen_Cons:Nil3_5(+(x, 1)) ⇔ Cons(0', gen_Cons:Nil3_5(x))
gen_0':S:M4_5(0) ⇔ 0'
gen_0':S:M4_5(+(x, 1)) ⇔ S(gen_0':S:M4_5(x))

No more defined symbols left to analyse.

(36) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
minus#2(gen_0':S:M4_5(n6_5), gen_0':S:M4_5(n6_5)) → gen_0':S:M4_5(0), rt ∈ Ω(1 + n65)

(37) BOUNDS(n^1, INF)

(38) Obligation:

Innermost TRS:
Rules:
cond_scanr_f_z_xs_1(Cons(0', x11), 0') → Cons(0', Cons(0', x11))
cond_scanr_f_z_xs_1(Cons(S(x2), x11), 0') → Cons(S(x2), Cons(S(x2), x11))
cond_scanr_f_z_xs_1(Cons(0', x11), M(x2)) → Cons(0', Cons(0', x11))
cond_scanr_f_z_xs_1(Cons(S(x40), x23), M(0')) → Cons(S(x40), Cons(S(x40), x23))
cond_scanr_f_z_xs_1(Cons(S(x8), x23), M(S(x4))) → Cons(minus#2(x8, x4), Cons(S(x8), x23))
cond_scanr_f_z_xs_1(Cons(0', x11), S(x2)) → Cons(S(x2), Cons(0', x11))
cond_scanr_f_z_xs_1(Cons(S(x2), x11), S(x4)) → Cons(plus#2(S(x4), S(x2)), Cons(S(x2), x11))
scanr#3(Nil) → Cons(0', Nil)
scanr#3(Cons(x4, x2)) → cond_scanr_f_z_xs_1(scanr#3(x2), x4)
foldl#3(x2, Nil) → x2
foldl#3(x6, Cons(x4, x2)) → foldl#3(max#2(x6, x4), x2)
minus#2(0', x16) → 0'
minus#2(S(x20), 0') → S(x20)
minus#2(S(x4), S(x2)) → minus#2(x4, x2)
plus#2(0', S(x2)) → S(x2)
plus#2(S(x4), S(x2)) → S(plus#2(x4, S(x2)))
max#2(0', x8) → x8
max#2(S(x12), 0') → S(x12)
max#2(S(x4), S(x2)) → S(max#2(x4, x2))
main(x1) → foldl#3(0', scanr#3(x1))

Types:
cond_scanr_f_z_xs_1 :: Cons:Nil → 0':S:M → Cons:Nil
Cons :: 0':S:M → Cons:Nil → Cons:Nil
0' :: 0':S:M
S :: 0':S:M → 0':S:M
M :: 0':S:M → 0':S:M
minus#2 :: 0':S:M → 0':S:M → 0':S:M
plus#2 :: 0':S:M → 0':S:M → 0':S:M
scanr#3 :: Cons:Nil → Cons:Nil
Nil :: Cons:Nil
foldl#3 :: 0':S:M → Cons:Nil → 0':S:M
max#2 :: 0':S:M → 0':S:M → 0':S:M
main :: Cons:Nil → 0':S:M
hole_Cons:Nil1_5 :: Cons:Nil
hole_0':S:M2_5 :: 0':S:M
gen_Cons:Nil3_5 :: Nat → Cons:Nil
gen_0':S:M4_5 :: Nat → 0':S:M

Lemmas:
minus#2(gen_0':S:M4_5(n6_5), gen_0':S:M4_5(n6_5)) → gen_0':S:M4_5(0), rt ∈ Ω(1 + n65)

Generator Equations:
gen_Cons:Nil3_5(0) ⇔ Nil
gen_Cons:Nil3_5(+(x, 1)) ⇔ Cons(0', gen_Cons:Nil3_5(x))
gen_0':S:M4_5(0) ⇔ 0'
gen_0':S:M4_5(+(x, 1)) ⇔ S(gen_0':S:M4_5(x))

No more defined symbols left to analyse.

(39) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
minus#2(gen_0':S:M4_5(n6_5), gen_0':S:M4_5(n6_5)) → gen_0':S:M4_5(0), rt ∈ Ω(1 + n65)

(40) BOUNDS(n^1, INF)